'''
Author: ytj
Date: 2023-11-06 08:41:11
LastEditTime: 2024-01-23 10:36:34
LastEditors: ytj
Description: 文件描述
'''
# encoding:utf-8
import requests

# 接口地址
url = "https://api.map.baidu.com/geoconv/v1/"

# 此处填写你在控制台-应用管理-创建应用后获取的AK
ak = "V5vNGZRV1Ar4115Vly1qcwIeLizrVf7m"

params = {
    "coords":    "113.739681,34.845173",
    "from":    "3",
    "to":    "5",
    "ak":       ak,

}

response = requests.get(url=url, params=params)
if response:
    print(response.json())